package com.woniu.car.parameter;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class CouponParameter {
    @Min(value=0,message = "id不可能为负数")
    @ApiModelProperty(value = "种类类型",example="0")
    private Integer type;
    @ApiModelProperty(value = "优惠券开启时间")
    @NotNull(message = "无优惠券开始时间")
    private Date startTime;
    @ApiModelProperty(value = "优惠券结束时间")
    @NotNull(message = "无优惠券结束时间")
    private Date endTime;
    @Min(value=0,message = "抵扣金额至少得是正数")
    @ApiModelProperty(value = "抵扣金额",example = "0.0")
    private Double deductionMoney;
    @Min(value=0,message = "折扣比例至少得是正数")
    @ApiModelProperty(value = "折扣比例",example = "0.0")
    private Double discountMoney;
    @Min(value=0,message = "抵扣金额至少得是正数")
    @ApiModelProperty(value = "折扣金额",example = "0.0")
    private Double fullMoney;
    @ApiModelProperty(value = "图片地址")
    private String img;
    @ApiModelProperty(value = "优惠券数量",example = "0")
    @Min(value=0,message = "最少发放一张")
    @NotNull(message = "必须发放优惠券")
    private Integer count;
}
